2127f4
@@ -833,7 +833,8 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
             }
 
             XMLBuilderVisitor builder = new XMLBuilderVisitor(document,
-                    isDelimiterParsingDisabled() ? (char) 0 : getListDelimiter());
+                    isDelimiterParsingDisabled() ? (char) 0 : getListDelimiter(),
+                    isAttributeSplittingDisabled());
             builder.processDocument(getRoot());
             initRootElementText(document, getRootNode().getValue());
             return document;
@@ -1309,9 +1310,9 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
             {
                 if (txtNode == null)
                 {
-                    txtNode = document
-                            .createTextNode(PropertyConverter.escapeDelimiters(
-                                    value.toString(), getListDelimiter()));
+                    String newValue = isDelimiterParsingDisabled() ? value.toString() :
+                        PropertyConverter.escapeDelimiters(value.toString(), getListDelimiter());
+                    txtNode = document.createTextNode(newValue);
                     if (((Element) getReference()).getFirstChild() != null)
                     {
                         ((Element) getReference()).insertBefore(txtNode,
@@ -1324,8 +1325,9 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
                 }
                 else
                 {
-                    txtNode.setNodeValue(PropertyConverter.escapeDelimiters(
-                            value.toString(), getListDelimiter()));
+                    String newValue = isDelimiterParsingDisabled() ? value.toString() :
+                        PropertyConverter.escapeDelimiters(value.toString(), getListDelimiter());
+                    txtNode.setNodeValue(newValue);
                 }
             }
         }
@@ -1336,7 +1338,8 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
          */
         private void updateAttribute()
         {
-            XMLBuilderVisitor.updateAttribute(getParent(), getName(), getListDelimiter());
+            XMLBuilderVisitor.updateAttribute(getParent(), getName(), getListDelimiter(),
+                    isAttributeSplittingDisabled());
         }
 
         /**
@@ -1399,16 +1402,21 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
         private char listDelimiter = AbstractConfiguration.
                 getDefaultListDelimiter();
 
+        /** True if attributes should not be split */
+        private boolean isAttributeSplittingDisabled;
+
         /**
          * Creates a new instance of <code>XMLBuilderVisitor</code>
          *
          * @param doc the document to be created
          * @param listDelimiter the delimiter for attribute properties with multiple values
+         * @param isAttributeSplittingDisabled true if attribute splitting is disabled.
          */
-        public XMLBuilderVisitor(Document doc, char listDelimiter)
+        public XMLBuilderVisitor(Document doc, char listDelimiter, boolean isAttributeSplittingDisabled)
         {
             document = doc;
             this.listDelimiter = listDelimiter;
+            this.isAttributeSplittingDisabled = isAttributeSplittingDisabled;
         }
 
         /**
@@ -1435,7 +1443,8 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
         {
             if (newNode.isAttribute())
             {
-                updateAttribute(parent, getElement(parent), newNode.getName(), listDelimiter);
+                updateAttribute(parent, getElement(parent), newNode.getName(), listDelimiter,
+                    isAttributeSplittingDisabled);
                 return null;
             }
 
@@ -1475,8 +1484,10 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
          * @param elem the element that is associated with this node
          * @param name the name of the affected attribute
          * @param listDelimiter the delimiter for attributes with multiple values
+         * @param isAttributeSplittingDisabled true if attribute splitting is disabled.
          */
-        private static void updateAttribute(Node node, Element elem, String name, char listDelimiter)
+        private static void updateAttribute(Node node, Element elem, String name, char listDelimiter,
+                                            boolean isAttributeSplittingDisabled)
         {
             if (node != null && elem != null)
             {
@@ -1492,8 +1503,10 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
                         {
                             buf.append(delimiter);
                         }
-                        buf.append(PropertyConverter.escapeDelimiters(attr
-                                .getValue().toString(), delimiter));
+                        String value = isAttributeSplittingDisabled ? attr.getValue().toString() :
+                            PropertyConverter.escapeDelimiters(attr.getValue().toString(),
+                                    delimiter);
+                        buf.append(value);
                     }
                     attr.setReference(elem);
                 }
@@ -1517,12 +1530,15 @@
public class XMLConfiguration extends AbstractHierarchicalFileConfiguration
          * @param node the affected node
          * @param name the name of the attribute
          * @param listDelimiter the delimiter for attributes with multiple values
+         * @param isAttributeSplittingDisabled true if attributes splitting is disabled.
          */
-        static void updateAttribute(Node node, String name, char listDelimiter)
+        static void updateAttribute(Node node, String name, char listDelimiter,
+                                    boolean isAttributeSplittingDisabled)
         {
             if (node != null)
             {
-                updateAttribute(node, (Element) node.getReference(), name, listDelimiter);
+                updateAttribute(node, (Element) node.getReference(), name, listDelimiter,
+                        isAttributeSplittingDisabled);
             }
         }
 
